﻿<GRAMMAR LANGID="409">

  <DEFINE>
    <ID NAME="RID_tous_rule" VAL="1"></ID>

    <ID NAME="RID_Operateur" VAL="36"></ID>
    <ID NAME="RID_Colon" VAL="37"></ID>
    <ID NAME="RID_Semicolon" VAL="39"></ID>
    <ID NAME="RID_Comma" VAL="40"></ID>
    <ID NAME="RID_Dot" VAL="41"></ID>
    <ID NAME="RID_Greater" VAL="48"></ID>
    <ID NAME="RID_Less" VAL="49"></ID>
    <ID NAME="RID_different" VAL="19"></ID>
    <ID NAME="RID_equal" VAL="20"></ID>
    <ID NAME="RID_at_line" VAL="21"></ID>


    <ID NAME="RID_integer" VAL="200"></ID>
    <ID NAME="RID_float" VAL="201"></ID>

    <ID NAME="RID_natural_number" VAL="101"></ID>
    <ID NAME="RID_cardinal" VAL="102"></ID>
    <ID NAME="RID_numeral_sign" VAL="103"></ID>
    <ID NAME="RID_digit_nonzero" VAL="104"></ID>
    <ID NAME="RID_teens" VAL="105"></ID>
    <ID NAME="RID_tensfrag" VAL="106"></ID>
    <ID NAME="RID_cardinal_1_to_99" VAL="107"></ID>
    <ID NAME="RID_cardinal_1_to_hundreds" VAL="108"></ID>
    <ID NAME="RID_cardinal_1_to_thousands" VAL="109"></ID>
    <ID NAME="RID_cardinal_1_to_millions" VAL="110"></ID>
    <!--<ID NAME="RID_cardinal_1_to_billions" VAL="111"></ID>
    <ID NAME="RID_cardinal_1_to_trillions" VAL="112"></ID>-->

    <ID NAME="RID_ACTION" VAL="400"></ID>
    <ID NAME="RID_ACTIONS" VAL="401"></ID>
    <ID NAME="RID_FUNCTION" VAL="402"></ID>
    <ID NAME="RID_FUNCTIONS" VAL="403"></ID>
    <ID NAME="RID_END" VAL="404"></ID>
    <ID NAME="RID_BEGIN" VAL="405"></ID>

  </DEFINE>

  <RULE NAME="tous_rule" ID="RID_tous_rule" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <L>

      <P>
        <P DISP="ASS">ASSIGN</P>
        <O>
          <L>
            <P>fc
              <P DISP="ADDR" >ADDRESS</P>
              <L>
                <P DISP="R">RIGHT</P>
                <P DISP="L">LEFT</P>
              </L>
            </P>
            <P>DEGREE</P>
            <P>ITEM</P>
            <P>HEADER</P>
            <P DISP="RS">RIGHT SON</P>
            <P DISP="LS">LEFT SON</P>
            <P DISP="S">SON</P>
            <P>
              <P DISP="INFO">INFORMATION</P>
              <O>
                <L>
                  <P DISP="R">RIGHT</P>
                  <P DISP="L">LEFT</P>
                </L>
              </O>
            </P>

            <P>STRUCT</P>
            <P>VALUE</P>
          </L>
        </O>
      </P>

      <P>
        ALEA
        <L>
          <P>STRING</P>
          <P>NUMBER</P>
        </L>
      </P>

      <P>
        ALLOC
        <L>
          <P>BLOCK</P>
          <P>STRUCT</P>
          <P>ARRAY</P>
          <P>CATE</P>
        </L>
      </P>

      <P>CALL</P>

      <P>
        INIT
        <L>
          <P>QUEUE</P>
          <P>STACK</P>
        </L>
      </P>

      <P>
        CREATE
        <L>
          <P>NODE</P>
          <P>
            <L>
              <L>
                <P>B</P>
                <P DISP="B">BIN</P>
              </L>
              <L>
                <P>M</P>
                <P DISP="M">MARY</P>
              </L>
            </L>
            <L>
              <P>S</P>
              <P DISP="S">SEARCH</P>
            </L>
            <L>
              <P>T</P>
              <P DISP="T">TREE</P>
            </L>
          </P>
          <P>
            <L>
              <P>QUEUE</P>
              <P>LIST</P>
              <P>BILIST</P>
            </L>
            with  <RULEREF NAME="integer"/>
            <L>
              <P>argument</P>
              <P>arguments</P>
            </L>
          </P>
        </L>
      </P>

      <P>DEQUEUE</P>

      <P>DEGREE</P>

      <P>
        WRITE FILE
        <L>
          <P DISP="DIR">DIRECT</P>
          <P DISP="SEQ">SEQUENCE</P>
        </L>
      </P>

      <P>ITEM</P>

      <P>PUSH</P>

      <P>ENQUEUE</P>

      <P>HEADER</P>

      <P>INTEGER</P>

      <P>INTEGERS</P>

      <P>EXP</P>

      <P>FALSE</P>

      <P>RIGHT SON</P>

      <P>CLOSE FILE</P>

      <P>LEFT SON</P>

      <P>
        END
        <O>
          <L>
            <P>FILE</P>
            <P>FOR</P>
            <P>IF</P>
            <P>WHILE</P>
            <P>ELSE</P>
          </L>
        </O>
      </P>

      <P>
        <P DISP="INFO">INFORMATION</P>
        <O>
          <P DISP="R">RIGHT</P>
          <P DISP="L">LEFT</P>
        </O>
      </P>

      <P>
        INIT
        <L>
          <P>STRUCT</P>
          <P>ARRAY</P>
        </L>
      </P>

      <P>
        FREE
        <L>
          <P>NODE</P>
          <P>STRUCT</P>
          <P>ARRAY</P>
        </L>
      </P>

      <P>
        READ
        <O>
          FILE
          <L>
            <P DISP="DIR">DIRECT</P>
            <P DISP="SEQ">SEQUENCE</P>
          </L>
        </O>
      </P>

      <P>LENGTH</P>

      <P>MAX</P>

      <P>MIN</P>

      <P>MOD</P>

      <P>NULL</P>

      <P>
        <P DISP=" ">-LOGICAL</P>
        <L>
          <P>NOT</P>
          <P>AND</P>
          <P>OR</P>
        </L>
      </P>

      <P>OPEN FILE</P>

      <P>FATHER</P>

      <P>STACK EMPTY</P>

      <P>PREVIOUS</P>

      <P>
        ADD
        <L>
          <P>
            <RULEREF NAME="integer"/>
            <L>
              <P>argument</P>
              <P>arguments</P>
            </L>
          </P>
          <P>FILE</P>
        </L>
      </P>
      
      <P>
        <P DISP=" ">Insert</P>
        <L>
          <P>FOR</P>
          <P>
            IF
            <O>ELSE</O>
          </P>
          <P>WHILE</P>
        </L>
      </P>

      <P>
        NEXT        
        <O>ARGUMENT</O>
      </P>

      <P>VALUE</P>

      <P>
        <L>
          <L>
            <P>B</P>
            <P DISP="B">BIN</P>
          </L>
          <L>
            <P>M</P>
            <P DISP="M">MARY</P>
          </L>
        </L>
        <L>
          <P>S</P>
          <P DISP="S">SEARCH</P>
        </L>
        <L>
          <P>T</P>
          <P DISP="T">TREE</P>
        </L>
      </P>

      <P>DEFINITIONS</P>
      <P>DEFINITION</P>
      <P>INTEGER</P>
      <P>INTEGERS</P>
      <P>BOOLEAN</P>
      <P>BOOLEANS</P>
      <P>BUFFER</P>
      <P>CHAR</P>
      <P>CHARACT</P>
      <P>CHARACTER</P>
      <P>CHARACTERS</P>
      <P>STRING</P>
      <P>OF</P>
      <P>SOME</P>
      <P>DYNAMIC</P>
      <P>DYNAMICS</P>
      <P>FILE</P>
      <P>FILES</P>
      <P>QUEUE</P>
      <P>QUEUES</P>
      <P>SON</P>
      <P>LIST</P>
      <P>LISTS</P>
      <P>BILIST</P>
      <P>STACK</P>
      <P>STACKS</P>
      <P>POINTERS</P>
      <P>DEFINITIONS</P>
      <P>DEFINITION</P>
      <P>STRUCT</P>
      <P>STRUCTURE</P>
      <P>STRUCTURES</P>
      <P>ARRAY</P>
      <P>ARRAYS</P>
      <P>ONE</P>
      <P>VECTOR</P>

      <P>
        move
        <L>
          <P>
            to
            <L>
              <P>end</P>
              <P>start</P>
            </L>
          </P>
          <P>
            page
            <L>
              <P>down</P>
              <P>up</P>
            </L>
          </P>
        </L>
      </P>

    </L>
  </RULE>

  <RULE NAME="ACTION" ID="RID_ACTION" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>ACTION</P>
  </RULE>

  <RULE NAME="ACTIONS" ID="RID_ACTIONS" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>ACTIONS</P>
  </RULE>

  <RULE NAME="FUNCTION" ID="RID_FUNCTION" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>FUNCTION</P>
  </RULE>

  <RULE NAME="FUNCTIONS" ID="RID_FUNCTIONS" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>FUNCTIONS</P>
  </RULE>

  <RULE NAME="END" ID="RID_END" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>+END</P>
  </RULE>

  <RULE NAME="BEGIN" ID="RID_BEGIN" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>+BEGIN</P>
  </RULE>

  <RULE NAME="Operateur" ID="RID_Operateur"  TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <L>
      <L>
        <P DISP="-">
          negative
        </P>
        <P DISP="-">
          minus
        </P>
        <P DISP="+">
          positive
        </P>
        <P DISP="+">
          plus
        </P>
        <P DISP="/">
          div
        </P>
        <P DISP="*">
          times
        </P>
        <P DISP="%">
          mod
        </P>
      </L>
    </L>
  </RULE>

  <RULE NAME="Colon" ID="RID_Colon" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P DISP=":">Colon</P>
  </RULE>

  <RULE NAME="Semicolon" ID="RID_Semicolon" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P DISP=";">Semi colon</P>
  </RULE>

  <RULE NAME="Comma" ID="RID_Comma" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P DISP=",">Comma</P>
  </RULE>

  <RULE NAME="Dot" ID="RID_Dot" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P DISP=".">Dot</P>
  </RULE>

  <RULE NAME="Greater" ID="RID_Greater" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>
      Greater
    </P>
    <P DISP=" ">
      Than
    </P>
    <O>
      <P DISP="=">Equal</P>
    </O>
  </RULE>

  <RULE NAME="Less" ID="RID_Less" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>
      Less
    </P>
    <P DISP=" ">
      Than
    </P>
    <O>
      <P DISP="=">Equal</P>
    </O>
  </RULE>

  <RULE NAME="different" ID="RID_different" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>different</P>
  </RULE>

  <RULE NAME="equal" ID="RID_equal" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P DISP=" = ">equal</P>
    <O>
      <P DISP=" ">to</P>
    </O>
  </RULE>

  <RULE NAME="at_line"  ID="RID_at_line" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>
      at line
      <RULEREF NAME="integer"></RULEREF>
    </P>
  </RULE>

  <!--$integer._value: integer (Z) -->
  <RULE NAME="integer"  ID="RID_integer" TOPLEVEL="ACTIVE" DYNAMIC="TRUE">
    <P>
      <O>
        <RULEREF NAME="numeral_sign"/>
      </O>
      <P>
        <RULEREF NAME="natural_number"/>
      </P>
    </P>
  </RULE>

  <!--$integer._value: integer (Z) -->
  <RULE NAME="float"  ID="RID_float" TOPLEVEL="INACTIVE" DYNAMIC="TRUE">
    <P>
      <RULEREF NAME="integer"/>
      Dot
      <O>
        <RULEREF NAME="integer"/>
      </O>
    </P>
    <O>
      e
      <RULEREF NAME="integer"/>
    </O>
  </RULE>


  <!-- $natural_number._value: integer (N) -->
  <RULE NAME="natural_number"  ID="RID_natural_number" TOPLEVEL="INACTIVE">
    <P>
      <RULEREF NAME="cardinal"/>
    </P>
  </RULE>

  <!-- $natural_number._value: integer (N) -->
  <RULE NAME="cardinal"  ID="RID_cardinal" TOPLEVEL="INACTIVE">
    <L>
      <P>
        +zero
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_thousands"/>
      </P>
    </L>
  </RULE>

  <!-- $numeral_sign._value: {+,-} -->
  <RULE NAME="numeral_sign" ID="RID_numeral_sign" TOPLEVEL="INACTIVE">
    <L>
      <P DISP="-">
        negative
      </P>
      <P DISP="-">
        minus
      </P>
      <P DISP="+">
        positive
      </P>
      <P DISP="+">
        plus
      </P>
    </L>
  </RULE>

  <!-- $digit_nonzero._value: integer [1,9]-->
  <RULE NAME="digit_nonzero"  ID="RID_digit_nonzero" TOPLEVEL="INACTIVE">
    <L>
      <P>
        one
      </P>
      <P>
        two
      </P>
      <P>
        three
      </P>
      <P>
        four
      </P>
      <P>
        five
      </P>
      <P>
        six
      </P>
      <P>
        seven
      </P>
      <P>
        eight
      </P>
      <P>
        +nine
      </P>
    </L>

  </RULE>

  <!-- $teens._value: {10, 11, 12,..., 19} -->
  <RULE NAME="teens"  ID="RID_teens" TOPLEVEL="INACTIVE">
    <L>
      <P>
        ten
      </P>
      <P>
        eleven
      </P>
      <P>
        twelve
      </P>
      <P>
        thirteen
      </P>
      <P>
        fourteen
      </P>
      <P>
        fifteen
      </P>
      <P>
        sixteen
      </P>
      <P>
        seventeen
      </P>
      <P>
        eighteen
      </P>
      <P>
        nineteen
      </P>
    </L>
  </RULE>

  <!-- $tensfrag._value: {20, 30, 40,..., 90} -->
  <RULE NAME="tensfrag"  ID="RID_tensfrag" TOPLEVEL="INACTIVE">
    <L>
      <P>
        twenty
      </P>
      <P>
        thirty
      </P>
      <P>
        forty
      </P>
      <P>
        fifty
      </P>
      <P>
        sixty
      </P>
      <P>
        seventy
      </P>
      <P>
        eighty
      </P>
      <P>
        ninety
      </P>
    </L>
  </RULE>

  <!-- $cardinal_1_to_99._value: [1,99] -->
  <RULE NAME="cardinal_1_to_99"  ID="RID_cardinal_1_to_99" TOPLEVEL="INACTIVE">
    <L>
      <P>
        <RULEREF NAME="digit_nonzero"/>
      </P>
      <P>
        <RULEREF NAME="teens"/>
      </P>
      <P>
        <RULEREF NAME="tensfrag"/>
        <O>
          <RULEREF NAME="digit_nonzero"/>
        </O>
      </P>
    </L>
  </RULE>

  <!-- $cardinal_1_to_999._value: [1,999] -->
  <RULE NAME="cardinal_1_to_hundreds"  ID="RID_cardinal_1_to_hundreds" TOPLEVEL="INACTIVE">
    <L>
      <P>
        hundred
      </P>
      <P>
        <RULEREF NAME="digit_nonzero"/>
        hundred
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_99"/>
      </P>
      <P>
        <RULEREF NAME="digit_nonzero"/>
        hundred
        <O>
          and
        </O>
        <RULEREF NAME="cardinal_1_to_99"/>
      </P>

    </L>
  </RULE>

  <!-- $cardinal_1_to_999 999._value: [1,999 999] -->
  <RULE NAME="cardinal_1_to_thousands"  ID="RID_cardinal_1_to_thousands" TOPLEVEL="INACTIVE">
    <L>
      <P>
        thousand
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        thousand
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        thousand
        <RULEREF NAME="cardinal_1_to_hundreds"/>
      </P>
    </L>
  </RULE>

  <!-- $cardinal_1_to_999 999 999._value: [1,999 999 999] -->
  <RULE NAME="cardinal_1_to_millions"  ID="RID_cardinal_1_to_millions" TOPLEVEL="INACTIVE">
    <L>
      <P>
        million
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        million
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_thousands"/>
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        million
        <O>
          and
        </O>
        <RULEREF NAME="cardinal_1_to_thousands"/>
      </P>
    </L>
  </RULE>

  <!-- $cardinal_1_to_999 999 999 999._value: [1,999 999 999 999] -->
  <!--<RULE NAME="cardinal_1_to_billions"  ID="RID_cardinal_1_to_billions" TOPLEVEL="INACTIVE">
    <L>
      <P>
        billion
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        billion
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_millions"/>
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        billion
        <O>
          and
        </O>
        <RULEREF NAME="cardinal_1_to_millions"/>
      </P>
    </L>
  </RULE>-->

  <!-- $cardinal_1_to_999 999 999 999._value: [1,999 999 999 999 999] -->
  <!--<RULE NAME="cardinal_1_to_trillions"  ID="RID_cardinal_1_to_trillions" TOPLEVEL="INACTIVE">
    <L>
      <P>
        trillion
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        trillion
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_billions"/>
      </P>
      <P>
        <RULEREF NAME="cardinal_1_to_hundreds"/>
        trillion
        <O>
          and
        </O>
        <RULEREF NAME="cardinal_1_to_billions"/>
      </P>
    </L>
  </RULE>-->

</GRAMMAR>
